package net.biancheng.www.helloworld.controller;

import net.biancheng.www.helloworld.bean.Person;
import net.biancheng.www.helloworld.bean.Persons;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {
    @Autowired
    private Person person;
    @Autowired
    private Persons persons;

    @ResponseBody
    @RequestMapping("/person")
    public Object PersonInfo() {
        return person;
    }
    @ResponseBody
    @RequestMapping("/persons")
    public Object PersonsInfo() {
        return persons;

    }
}